<template>
	<view class="">
		<cu-custom bgColor="bg-white"   :isBack="true">
			<block slot="backText">
				<text ></text>
			</block>
			<block slot="content">
				<text >我的足迹</text>
			</block>
		</cu-custom>
		<view class="cu-timeline" v-for="(item,index) in steplist" :key="index">
			<view class="cu-time">{{item.date}}</view>
			<view class="cu-item text-blue" v-for="(step,i) in item.steps" :key="i">
				<view class="content shadow-blur" :class="step.theme">
					<view class="flex justify-between">
						<view class="flex align-center">
							<uni-icons color="#ffda33" type="location-filled"></uni-icons>
							<text class="margin-left-xs">{{step.address}}</text>
						</view>
						<u-tag :text="step.time" type="error" />
					</view>
					<view class="margin-top text-content">
						<text>{{step.content}}</text>
					</view>
					<view class="">
						<u-image border-radius="10" width="100%" class="margin-top" v-for="(image,e) in step.images" :key="e" height="400rpx" :src="image"></u-image>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
// Math.floor(Math.random()*theme.length)随机返回主题颜色
const theme = ['bg-blue','bg-grey','bg-pink','bg-mauve','bg-purple','bg-blue','bg-cyan','bg-green','bg-olive','bg-yellow','bg-orange','bg-red'];
import cuCustom from '../../colorui/components/cu-custom.vue'
export default {
	components:{
		cuCustom
	},
	data() {
		return {
			
			steplist:[
				{
					date:'11-17',
					steps:[
						{
							time:'18:00',//时间
							images:['https://placeimg.com/640/480/nature'],//旅行拍照
							content:'开心',//心情内容
							address:'北京市',//打卡位置
							theme:theme[Math.floor(Math.random()*theme.length)],
						},
						{
							time:'8:00',//时间
							images:['https://placeimg.com/640/480/people'],//旅行拍照
							content:'不错哦',//心情内容
							address:'杭州市',//打卡位置
							theme:theme[Math.floor(Math.random()*theme.length)],
						},
					],
				},
				{
					date:'11-16',
					steps:[
						{
							time:'10:00',
							content:'这是第一次，我家的铲屎官走了这么久。久到足足有三天！！ 在听到他的脚步声响在楼梯间的那一刻，我简直想要破门而出，对着他狠狠地吼上10分钟，然后再看心情要不要他进门。',
							address:'上海市',//打卡位置
							images:['https://placeimg.com/640/480/animals','https://placeimg.com/700/350/animals'],
							theme:theme[Math.floor(Math.random()*theme.length)],
						}
					],
				}
				
			],
		};
	},
	mounted(){
		console.log("this.list",this.list);
	}
}
</script>

<style lang="scss" scoped>
.text-content{
	text-indent: 40rpx;
}
</style>
